<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of slide_model
 *
 * @author Administrator
 */
class slide_model extends CI_Model{
    //put your code here
    function __construct() {
        parent::__construct();
    }
    
    function getAllSlides(){
        $query=$this->db->get_where(tbl_slides,array('slide_is_display'=>1));
        return $query->result();
    }
    
    function getSlideByID($id){
        $query=$this->db->get_where(tbl_slides,array('slide_id'=>$id));
        $arr=$query->result();
        if($query->num_rows>0)
            return $arr[0];
        return null;
    }
}

?>
